<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
html{
height:100%
}

body{
	background-size:100% 100%; 
}
h1{
	text-align:center;
	font-family:arial;
	font-size:40px;
	color:white;
}

.txt{
	height:30px;
	width:225px;
	border-radius: 10px;
}
.sec{
	height:30px;
	width:80px;
	border-radius: 10px;
}
.button{
		background-color:RGB(64,158,255);
    	border-width: 1px;
    	color: white;
    	padding: 7px 32px;
    	width: 200px;
   	 	text-align: center;
    	font-size: 16px;
    	border-radius:20px;
    
	}
.button:hover {
    background-color: RGB(87,170,255);
}



form {
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-shadow: 0px 0px 10px #ccc;	
	padding-left:20px;
	display: inline-block;
	height:390px;
	width:90%;
}
	
	
input[type="text"], input[type="password"] {
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	margin-bottom: 20px;
	font-size: 16px;
	width: 200px;
}

input[type="submit"] {
	background-color: #4CAF50;
	color: #fff;
	padding: 10px 20px;
	border: none;
	border-radius: 3px;
	font-size: 16px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}
	
input[type="submit"]:hover {
	background-color: #3e8e41;
}
.button_select{
	border:none;
	background-color:white;
	font-size:20px;
	margin-top:10px;
	margin-bottom:40px;
	outline:none;
	text-align:center;
	height:20px;
	width:100px;
}
.error {
color: red;
font-size: 14px;
margin-top: -10px;
margin-bottom: 10px;
}
</style>
</head>
<body >
	<!--<h1>南航用车管理系统</h1> --> 
		
		<form  action="C_Servlet" method="get" >
			<input  class="button_select" style="margin-right:50px;margin-left:20px;" value="登录">
			<input class="button_select" style="margin-right:20px" onclick='location.href=("C-form_enroll.jsp")'value="职员注册">
			
		<br/>
			&nbsp;账号：<input type="text"  name="ID" id="ID"value=""><br/><br/>
			&nbsp;密码：<input type="password"  name="password" id="password"value=""><br/><br/>
			<input type="hidden" name="action" value="login">
			&nbsp;职位：<select class="sec" name="department">
			<option value="管理端">管理端</option>
			<option value="司机">司机</option>
			<option value="职员">职员</option>
			<option value="财务部">财务部</option>
			<option value="运输端">运输端</option>
		</select>
		<%
			String loginok=(String)request.getAttribute("loginok");
			System.out.println(loginok);
			if(loginok!=null&&loginok.equals("0"))
			{
				
		%>	
			<script type="text/javascript">
				document.getElementById("ID").value="<%=request.getAttribute("lastID") %>";
				document.getElementById("password").value="<%=request.getAttribute("lastpassword") %>";
			</script>
			<span class="error">用户名或密码错误</span><br/>
		<%
			}
		%>
		<div style="text-align:center;margin-top:30px;">
			<input type="submit" class="button" value="登录"  >
		</div>
		</form>

	
</body>
</html>